define(["common","application","abstractObject"],function($,app){
    /**
     * .
     * <p>
     * 调用方法:
     * </p>
     * @param settings
     *          配置.
     * @param target
     *          直接的html对象.
     */
    function AbstractView(settings, target) {
      AbstractObject.call(this,settings,target);
      this.settings=$.extend({},this.settings,settings);
      this.target=target;
      this.$target=$(target);
    }

    AbstractView.prototype=new AbstractObject();
    AbstractView.prototype.constructor=AbstractView;

    /**
     * 默认配置属性.
     */
    AbstractView.prototype.settings = {};

    AbstractView.prototype.render=function(c,data){
      this.applySuperFunc(AbstractObject,"render",arguments);
    }
    
    AbstractView.prototype.whenClick=function(c,left,top,width,height,callback){
      var res = false;
      var data = app.findBizClick();
      if(data&&c&&c.isPointInRect(data.x,data.y,left,top,width,height)){
        callback&&app.addCallback(callback);
        res=true;
      }
      return res;
    }
    return AbstractView;
});